package  com.kgis.fm.common.event{
    import flash.events.Event;

    /**
     * 选中设施事件
     * @author zhanghong
     * */
    public class FeatureSelectedEvent extends Event {

        public static const REQUEST_ID:String = "FeatureSelectedEvent_Request";

        public static const RETURN_ID:String = "FeatureSelectedEvent_Return";

        public static const TYPE_FEATURE_SELECTED:String = "feature_selected";
        public static const TYPE_FEATURE_UNSELECTED:String = "feature_unselected";

        private var _spec:Object = null;

        private var _actionType:String = null;

        public function FeatureSelectedEvent(spec:Object, actionType:String = TYPE_FEATURE_SELECTED, type:String = null) {
            var typeId:String = type;
            if (type == null) {
                typeId = REQUEST_ID;
            }
            super(typeId);
            if (actionType) {
                _actionType = actionType;
            }
            _spec = spec;
        }

        public override function clone():Event {
            var event:FeatureSelectedEvent = new FeatureSelectedEvent(spec, actionType, type);
            return event;
        }

        public function get spec():Object {
            return _spec;
        }

        public function get actionType():String {
            return _actionType;
        }
    }
}
